{"version":3,"sources":["settings-window.js"],"names":["BX","namespace","Grid","SettingsWindow","parent","this","popupItems","items","popup","sourceContent","applyButton","resetButton","cancelButton","init","onCustomEvent","window","prototype","bind","getContainer","proxy","_onContainerClick","addCustomEvent","_onColumnMoved","destroy","unbind","removeCustomEvent","getPopup","close","getSelectAllButton","selectAllButton","Utils","getByClass","contentContainer","settings","get","getUnselectAllButton","unselectAllButton","reset","allColumns","event","hasClass","target","_onSettingsButtonClick","show","fetchColumns","promise","Promise","ajax","url","getParam","method","dataType","onsuccess","fulfill","prepareColumnOptions","options","customNames","getUserOptions","getCurrentOptions","custom_names","type","isPlainObject","id","name","getColumnHeaderCellByName","selected","createColumnElement","html","create","firstElementChild","useLazyLoadColumns","getSourceContent","contentList","querySelector","innerHTML","loader","Loader","then","response","forEach","columnOptions","appendChild","hide","getItems","item","getNode","delegate","onItemClick","fixedFooter","props","className","children","requestAnimationFrame","popupContainer","style","width","clientWidth","getPopupItems","getSelectedColumns","columns","column","isSelected","push","getId","restoreColumns","restore","sortItems","restoreLastColumns","current","restoreState","updateColumnsState","updateState","getStickedColumns","reduce","accumulator","isSticked","saveColumns","callback","columnNames","getColumnNames","stickedColumns","batch","action","getAction","join","isForAll","view_id","set_default_settings","delete_user_settings","reloadTable","disableAllColumnslabelEdit","disableEdit","getAllColumns","map","isShowedColumn","columnName","some","getShowedColumns","result","cells","getRows","getHeadFirstChild","getCells","slice","call","dataset","showedColumns","counter","Object","keys","getColumnByName","parentNode","names","isEdited","getTitle","getBySelector","onResetButtonClick","confirmDialog","CONFIRM","CONFIRM_MESSAGE","arParams","CONFIRM_RESET_MESSAGE","enableWait","getApplyButton","disableWait","getResetButtonId","getContainerId","onApplyButtonClick","unselectForAllCheckbox","getApplyButtonId","getCancelButtonId","getCancelButton","checkbox","getForAllCheckbox","checked","buttonNode","addClass","removeClass","createTitle","tmpDiv","pageTitleNode","pageTitle","innerText","firstChild","getPopupId","createPopup","PopupWindow","titleBar","autoHide","overlay","closeIcon","closeByEsc","contentNoPaddings","content","events","onPopupClose","getResetButton","onSelectAll","onUnselectAll","adjustActionButtonsState","SettingsWindowColumn","selectAll","enableActions","unselectAll","disableActions","select","unselect","length"],"mappings":"CAAC,WACA,aAEAA,GAAGC,UAAU,WAObD,GAAGE,KAAKC,eAAiB,SAASC,GAEjCC,KAAKD,OAAS,KACdC,KAAKC,WAAa,KAClBD,KAAKE,MAAQ,KACbF,KAAKG,MAAQ,KACbH,KAAKI,cAAgB,KACrBJ,KAAKK,YAAc,KACnBL,KAAKM,YAAc,KACnBN,KAAKO,aAAe,KACpBP,KAAKQ,KAAKT,GACVJ,GAAGc,cAAcC,OAAQ,+BAAgCV,QAI1DL,GAAGE,KAAKC,eAAea,WACtBH,KAAM,SAAST,GAEdC,KAAKD,OAASA,EACdJ,GAAGiB,KAAKZ,KAAKD,OAAOc,eAAgB,QAASlB,GAAGmB,MAAMd,KAAKe,kBAAmBf,OAC9EL,GAAGqB,eAAeN,OAAQ,oBAAqBf,GAAGmB,MAAMd,KAAKiB,eAAgBjB,QAG9EkB,QAAS,WAERvB,GAAGwB,OAAOnB,KAAKD,OAAOc,eAAgB,QAASlB,GAAGmB,MAAMd,KAAKe,kBAAmBf,OAChFL,GAAGyB,kBAAkBV,OAAQ,oBAAqBf,GAAGmB,MAAMd,KAAKiB,eAAgBjB,OAChFA,KAAKqB,WAAWC,SAQjBC,mBAAoB,WAEnB,IAAKvB,KAAKwB,gBACV,CACCxB,KAAKwB,gBAAkB7B,GAAGE,KAAK4B,MAAMC,WACpC1B,KAAKqB,WAAWM,iBAChB3B,KAAKD,OAAO6B,SAASC,IAAI,gCACzB,MAIF,OAAO7B,KAAKwB,iBAQbM,qBAAsB,WAErB,IAAK9B,KAAK+B,kBACV,CACC/B,KAAK+B,kBAAoBpC,GAAGE,KAAK4B,MAAMC,WACtC1B,KAAKqB,WAAWM,iBAChB3B,KAAKD,OAAO6B,SAASC,IAAI,kCACzB,MAIF,OAAO7B,KAAK+B,mBAObC,MAA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